<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setAttribute("basePath", basePath);
String baseInfoJson= (String)request.getAttribute("baseInfoJson");
String hospitalVisitJson= (String)request.getAttribute("hospitalVisitJson");
%>
<link rel="stylesheet" href="${basePath}/assets/bootstrap/css/bootstrap.css"/>    
<link rel="stylesheet" href="${basePath}/assets/css/medical_record/home_page.css"/>
<link rel="stylesheet" href="${basePath}/assets/css/basic.css"/>
<link rel="stylesheet" href="${basePath}/assets/jquery-ui/jquery-ui.css"/>
<script type="text/javascript" src="${basePath}/assets/js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}/assets/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="${basePath}/assets/jquery-ui/jquery-ui.js"></script>
<script type="text/javascript" src="${basePath}/assets/js/medical_record/home_page.js"></script>
<script type="text/javascript" src="${basePath}/assets/js/medical_record/edit_basic_info.js"></script>

<script type="text/javascript" src="${basePath}/assets/My97DatePicker/WdatePicker.js"></script>
<input type="hidden" id="basePath" value="${basePath }">
<form action="${basePath}/medical_record/edit_home_page_basic"
	method="post" id="basicDataForm" style="height:auto;">
<input type="hidden" name="visitGuid" value="${visitGuid }">
<table style="width:100%;" cellpadding="0" cellspacing="0">
<tbody>
	<!-- <tr> -->
		<!-- <td colspan="6"><input type="submit" value="保存" class="btn"></td> -->
		<!-- <td colspan="6"><input type="button" value="保存" class="btn" id="saveBaseBtn" disabled="disabled" onclick="homePageBasicDataSave()">
				</td> -->
			<!-- </tr> -->
			<tr>
				<td class="tdLabel_7">病案号</td>
				<td class="tdLabel_8">
					<input type="text" disabled="disabled" name="onlyId" value="${hospitalVisit.onlyId }" id="onlyId" title='' />
				</td>

				<td class="tdLabel_7">ID号</td>
				<td class="tdLabel_8">
					<input type="text" disabled="disabled" name="mrId" value="${hospitalVisit.mrId }" title='' />
				</td>
				<!-- <td class="tdLabel_7">医院</td>
				<td class="tdLabel_8">
					<input type="text" name="hospitalName" readonly="readonly"
								value="解放军第三〇五医院" title='' />
					<input type="hidden" name="hospitalCode" readonly="readonly"
								value="解放军第三〇五医院" title='' />
				</td> -->
				<td class="tdLabel_7">住院次数</td>
				<td class="tdLabel_8">
					<input readonly="readonly" type="text" name="visitNumber" id="visitNumber"
								value="${hospitalVisit.visitNumber }" title='' />
				</td>
			</tr>
		<!-- 	<tr> -->
				<%-- <td class="tdLabel_7">健康卡号</td>
				<td class="tdLabel_8">
					<input type="text" disabled="disabled" name="medicalInsuranceNumber" value="${hospitalVisit.medicalInsuranceNumber}" id="medicalInsuranceNumber"/>
				</td> --%>

			<!-- 	<td class="tdLabel_7">付费方式</td>
				<td class="tdLabel_8">
					<input type="text" name="payTypeId" id="payTypeId" value="" title='' />
					<select  name="medicalPayTypeCode" id="medicalPayTypeCode" title=''>
						
					</select>
					<input type="hidden" name="medicalPayTypeName"  value=""/>
				</td> -->
				<%-- <td class="tdLabel_7">住院次数</td>
				<td class="tdLabel_8">
					<input readonly="readonly" type="text" name="visitNumber" id="visitNumber"
								value="${hospitalVisit.visitNumber }" title='' />
				</td> --%>
		<!-- 	</tr> -->
			<tr>
				<td class="tdLabel_7">姓名</td>
				<td class="tdLabel_8">
					<input type="text" disabled="disabled" name="patientName" value="${hospitalVisit.patientName}" id="patientName" title='' />
				</td>

				<td class="tdLabel_7">证件类型</td>
				<td class="tdLabel_8">
					<select disabled="disabled" name="idDocumentTypeCode" id="idDocumentTypeCode" title=''>
						
					</select>
					<input type="hidden" name="idDocumentTypeName"  value=""/>
				</td>
				<td class="tdLabel_7">证件号</td>
				<td class="tdLabel_8">
					<input type="text" disabled="disabled" name="idNumber" id="idNumber"
								value="${hospitalVisit.idNumber }"/>
				</td>
			</tr>
			<tr>
				<td class="tdLabel_7">性别</td>
				<td class="tdLabel_8">
					<select name="sexCode" disabled="disabled" id="sexCode" title=''>
						
					</select>
					<input type="hidden" name="sexName"  value=""/>
				</td>

				<td class="tdLabel_7">出生日期</td>
				
									
					<td class="tdLabel_8"><input type="text" disabled="disabled"
						onFocus="WdatePicker()" name="birthday" value="${hospitalVisit.birthday }" />
					</td>
				<td class="tdLabel_7">年龄</td>
				<td class="tdLabel_8">
					<input type="text" name="age" id="age" value="${hospitalVisit.age }"/>
				</td>
			</tr>
			<tr>
				<td class="tdLabel_7">国籍</td>
				<td class="tdLabel_8">
					<select name="nationalityCode" disabled="disabled" id="nationalityCode" title=''>
						
					</select>
					<input type="hidden" name="nationalityName"  value=""/>
				</td>

				<td class="tdLabel_7">籍贯</td>
				<td class="tdLabel_8">
					<input type="text" disabled="disabled" name="nativePlace" id="nativePlace" value="${hospitalVisit.nativePlace}"/>
				</td>
				<td class="tdLabel_7">民族</td>
				<td class="tdLabel_8">
					<select name="nationCode" disabled="disabled" id="nationCode" title=''>
						
					</select>
					<input type="hidden" name="nationName"  value=""/>
				</td>
			</tr>
			
			<tr>
				<td class="tdLabel_7">人员类型</td>
				<td class="tdLabel_8">
					<select name="personnelCategoryCode" disabled="disabled" id="personnelCategorySelect">
						
					</select>
					<input type="hidden"  name="personnelCategoryName"  value=""/>
				</td>

				<td class="tdLabel_7">隶属大单位</td>
				<td class="tdLabel_8">
					<select name="majorUnitCode" disabled="disabled" id="majorUnitSelect">
						
					</select>
					<input type="hidden" name="majorUnitName"  value=""/>
				</td>
				<td class="tdLabel_7">勤务</td>
				<td class="tdLabel_8">
					<select name="troopServiceCode" disabled="disabled" id="troopServiceSelect">
						
					</select>
					<input type="hidden" name="troopServiceName"  value=""/>
				</td>
			</tr>
			
			<tr>
				<td class="tdLabel_7">医疗体系</td>
				<td class="tdLabel_8">
					<select name="medicalSystemCode" disabled="disabled" id="medicalSystemSelect">
						
					</select>
					<input type="hidden"  name="medicalSystemName"  value=""/>
				</td>

				<td class="tdLabel_7">身份</td>
				<td class="tdLabel_8">
					<select name="idTypeCode" disabled="disabled" id="idTypeSelect">
						
					</select>
					<input type="hidden" name="idTypeName"  value=""/>
				</td>
				<td class="tdLabel_7">费别</td>
				<td class="tdLabel_8">
					<select name="costTypeCode" disabled="disabled" id="costTypeSelect">
						
					</select>
					<input type="hidden" name="costTypeName"  value=""/>
				</td>
			</tr>
			
			<tr>
				<td class="tdLabel_7">在职状况</td>
				<td class="tdLabel_8">
					<select name="jobStateCode" disabled="disabled" id="jobStateSelect">
						
					</select>
					<input type="hidden" name="jobStateName"  value=""/>
				</td>
				
				
				<td class="tdLabel_7">付费方式</td>
				<td class="tdLabel_8">
					<!-- <input type="text" name="payTypeId" id="payTypeId" value="" title='' /> -->
					<select  name="medicalPayTypeCode" id="medicalPayTypeCode" title=''>
						
					</select>
					<input type="hidden" name="medicalPayTypeName"  value=""/>
				</td>

				<td class="tdLabel_7">军事训练伤</td>
				<td class="tdLabel_8">
					<select name="militaryTrainingInjuryCode" r id="militaryTrainingInjurySelect">
						
					</select>
					<input type="hidden" name="militaryTrainingInjuryName"  value=""/>
				</td>
				
			</tr>
			
			<tr>
				<td class="tdLabel_7">出生地</td>
				<td class="tdLabel_8">
					<input type="text" disabled="disabled" name="birthAddress" value="${hospitalVisit.birthAddress }" id="birthAddressCode"/>
				</td>

				<td class="tdLabel_7 ">职业</td>
				<td class="tdLabel_8">
					<select name="professionCode" disabled="disabled" id="professionCode" title=''>
						
					</select>
					<input type="hidden" name="professionName"  value=""/>
				</td>
				<td class="tdLabel_7 ">婚姻</td>
				<td class="tdLabel_8">
					<select disabled="disabled" name="marriageCode" id="marriageCode" title=''>
						
					</select>
					<input type="hidden" name="marriageName"  value=""/>
				</td>
			</tr>
			<tr>
				<td class="tdLabel_7" rowspan="2">现/永住地</td>
				<td class="tdLabel_8" colspan="5">地址 
					<input disabled="disabled" type="text" name="permanentAddress" style="width: 500px" value="${hospitalVisit.permanentAddress}">
				</td>
			</tr>
			<tr>
				<td class="tdLabel_8">电话 <input type="text" disabled="disabled"
					name="permanentAddressPhone" style="width:170px" value="${hospitalVisit.permanentAddressPhone}">
				</td>
				<td class="tdLabel_7">移动电话</td>
				<td class="tdLabel_8"><input disabled="disabled" type="text" name="permanentAddressMobilePhone"
					style="width:150px" value="${hospitalVisit.permanentAddressMobilePhone}">
				</td>
				<td class="tdLabel_7">邮编</td>
				<td class="tdLabel_8" ><input type="text" disabled="disabled"
					name="permanentAddressPostCode" style="width:150px"
					value="${hospitalVisit.permanentAddressPostCode}">
				</td>
			</tr>
			
			<tr>
				<td align="left" class="tdLabel_7" rowspan="2">工作单位</td>
				<td class="tdLabel_8" colspan="3">地址： <input disabled="disabled"
					type="text" name="workUnitAddress" style="width: 500px"
					value="${hospitalVisit.workUnitAddress }">
				</td>
				
				<td align="left" class="tdLabel_7">电话</td>
				<td class="tdLabel_8"><input type="text" disabled="disabled"
					name="workUnitPhone" value="${hospitalVisit.workUnitPhone }">
				</td>
			</tr>
			<tr>
				<td class="tdLabel_8" colspan="3">单位名：<input disabled="disabled" type="text" style="width: 490px"
					name="workUnitName" value="${hospitalVisit.workUnitName }">
				</td>
				<td align="left" class="tdLabel_7">邮编</td>
				<td class="tdLabel_8"><input type="text" disabled="disabled"
					name="workUnitPostCode" value="${hospitalVisit.workUnitPostCode}">
				</td>
			</tr>
			<tr>
				<td align="left" class="tdLabel_7" rowspan="2">联系人</td>
				<td align="left" class="tdLabel_8">姓名 <input type="text" disabled="disabled"
					name="linkManName" style="width: 150px"
					value="${hospitalVisit.linkManName}">
				</td>
				<td class="tdLabel_8" align="left" colspan="4">地址： <input disabled="disabled"
					type="text" name="linkManAddress" style="width: 500px"
					value="${hospitalVisit.linkManAddress}">
				</td>

			</tr>
			<tr>
				<td align="left" class="tdLabel_8" colspan="3">与病人关系&emsp;
					<select disabled="disabled" style="width: 40%;" name="linkManRelativeRelationCode" id="linkManRelativeRelationCode">
						
					</select>
					<input type="hidden" name="linkManRelativeRelationName"  value=""/>
				</td>
				<td class="tdLabel_7">电话</td>
				<td class="tdLabel_8"><input type="text" disabled="disabled"
					name="linkManPhone" style="width: 150px";
					value="${hospitalVisit.linkManPhone}">
				</td>
			</tr>

			<tr>
				<td class="tdLabel_7">接诊日期</td>
				<td class="tdLabel_8"><fmt:formatDate
						var="clinicalReceptionDate"
						value=""
						pattern="yyyy-MM-dd" /> <input type="text" disabled="disabled"
					onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" name="clinicalReceptionDateTime"
					value="${hospitalVisit.clinicalReceptionDateTime }" /></td>

				<td class="tdLabel_7">门诊医生</td>
				<td class="tdLabel_8"><input type="text" disabled="disabled"
					name="outpatientOfDoctorName"
					class="medical_worker_search_input"
					value="${hospitalVisit.outpatientOfDoctorName }">
					<input type="hidden" name="outpatientOfDoctorCode" value="${hospitalVisit.outpatientOfDoctorCode }">
				</td>

				<td class="tdLabel_7">经办人</td>
				<td class="tdLabel_8"><input type="text" disabled="disabled"
					name="responsiblePersonName"
					class="medical_worker_search_input"
					value="${hospitalVisit.responsiblePersonName }">
					<input type="hidden" name="responsiblePersonCode" value="${hospitalVisit.responsiblePersonCode }">
				</td>
			</tr>
			<!-- <tr>
				<td class="tdLabel_7 ">入院途径</td>
				<td class="tdLabel_8">
					<select name="inHospitalTypeCode" disabled="disabled" id="inHospitalTypeCode" title=''>
						
					</select>
					<input type="hidden" name="inHospitalTypeName"  value=""/>
				</td> -->
				<%-- <td class="tdLabel_7">转入机构</td>
				<td class="tdLabel_8" colspan="3">
					<input disabled="disabled" type="text" name="shiftToUnitName" value="${hospitalVisit.shiftToUnitName}">
				</td> --%>
			<!-- </tr> -->
			<tr>
				<td class="tdLabel_7 ">入院途径</td>
				<td class="tdLabel_8">
					<select name="inHospitalTypeCode" disabled="disabled" id="inHospitalTypeCode" title=''>
						
					</select>
					<input type="hidden" name="inHospitalTypeName"  value=""/>
				</td>
				<td class="tdLabel_7">入院状况</td>
				<td class="tdLabel_8">
				<select name="inHospitalStateCode" disabled="disabled" id="inHospitalStateCode" title=''>
						
					</select>
					<input type="hidden" name="inHospitalStateName"  value=""/>
				</td>
				<%-- <td class="tdLabel_7">颅脑损伤昏迷时间</td>
				<td class="tdLabel_8">
				 <input type="text" disabled="disabled" name="craniocerebralInjuryAndComaDateTime"
					onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"
					value="${hospitalVisit.craniocerebralInjuryAndComaDateTime}"></td> --%>
				<td class="tdLabel_7">诊断确诊时间</td>
				<td class="tdLabel_8">
				 <input  type="text" name="diagConfirmedDateTime"
					
					value="${hospitalVisit.diagConfirmedDateTime}" style="width: 150px">
				</td>
			</tr>
			
			<tr>
				<td class="tdLabel_7 ">入院科室</td>
				<td class="tdLabel_8">
					<select disabled="disabled" name="inDeptCode" id="inDeptCode" title=''>
						
					</select>
					<input type="hidden" name="inDeptName"  value=""/>
				</td>
				<td class="tdLabel_7 ">入院时间</td>
				<td class="tdLabel_8">
					<input  type="text" name="inHospitalDateTime"
					
					value="${hospitalVisit.inHospitalDateTime}" title=''></td>

			<%-- 	<td class="tdLabel_7">诊疗科目</td>
				<td class="tdLabel_8">
				<input disabled="disabled" type="text" name="diagSubjectName"
					value="${hospitalVisit.diagSubjectName}">
				</td> --%>
				<tr>
				<td class="tdLabel_7 ">出院科室</td>
				<td class="tdLabel_8">
					<select disabled="disabled" name="outDeptCode" id="outDeptCode" title=''>
						
					</select>
					<input type="hidden" name="outDeptName"  value=""/>
				</td>
				<td class="tdLabel_7 ">出院时间</td>
				<td class="tdLabel_8">
					<input  type="text" name="outHospitalDateTime"
					value="${hospitalVisit.outHospitalDateTime}" title=''></td>
			</tr>

			<tr>
				<td class="tdLabel_7 ">离院方式</td>
				<td class="tdLabel_8">
					<select  name="outHospitalTypeCode" id="outHospitalTypeCode" title=''>
						
					</select>
					<input type="hidden" name="outHospitalTypeName"  value=""/>
				</td>
				<%-- <td class="tdLabel_7">拟接收机构</td>
				<td class="tdLabel_8" colspan="3">
				<input disabled="disabled" type="text" name="receiveUnitName" value="${hospitalVisit.receiveUnitName }">
				</td> --%>
				<td class="tdLabel_7">根本死亡原因</td>
				<td class="tdLabel_8">
				<!-- 	<select disabled="disabled" name="dealthReasonCode" id="dealthReasonCode">
						
					</select> -->
					<input type="text" name="dealthReasonName"  value=""/> 
					
				</td>
				<td class="tdLabel_7">尸检</td>
				<td class="tdLabel_8" colspan="3">
					<input disabled="disabled" type="radio" class="radio_cl" name="autopsyCode" value="1">
                        			 是
                    <input disabled="disabled" type="radio" class="radio_cl" name="autopsyCode" value="0">
                        			 否
                    <input type="hidden" name="autopsyName" value="">
              	</td>

			</tr>
		<!-- 	<tr> -->
				<%-- <td class="tdLabel_7">再住院计划</td>
				<td class="tdLabel_8">
					<select disabled="disabled" style="width: 120px" name="rehospitalAimCode" id="rehospitalAimCode">
						
					</select>
					<input type="hidden" name="rehospitalAimName"  value=""/> 间隔 
					<input disabled="disabled" type="text" style="width:30px"
					name="rehospitalIntervalDayNumber"
					value="${hospitalVisit.rehospitalIntervalDayNumber }"> 天</td> --%>
			<!-- 	<td class="tdLabel_7">根本死亡原因</td>
				<td class="tdLabel_8">
					<select disabled="disabled" name="dealthReasonCode" id="dealthReasonCode">
						
					</select>
					<input type="hidden" name="dealthReasonName"  value=""/>
				</td>
				<td class="tdLabel_7">尸检</td>
				<td class="tdLabel_8" colspan="3">
					<input disabled="disabled" type="radio" class="radio_cl"  name="autopsyCode" value="1">
                        			 是
                    <input disabled="disabled" type="radio" class="radio_cl"  name="autopsyCode" value="0">
                        			 否
                    <input type="hidden" name="autopsyName" value="">
              	</td>
			</tr> -->
		</tbody>
	</table>
</form>
<script>
	$(function(){
		var baseInfoJson= <%=baseInfoJson%>;
		var hospitalVisitJson = <%=hospitalVisitJson%>
		initPage(baseInfoJson,hospitalVisitJson);
		$("#saveBaseBtn").removeAttr("disabled");
		
		validateData();
		
	});
	
	
	
</script>